---
title: Lint Rules
parent: linter/index
emoji: 📏
description: List of available lint rules.
category: reference
mainClass: rules
---

# Rules


## Accessibility

Rules focused on preventing accessibility problems.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noAccessKey">
	<a href="/lint/rules/noAccessKey">noAccessKey</a>
</h3>
Enforce that the <code>accessKey</code> attribute is not used on any HTML element.
</section>
<section class="rule">
<h3 data-toc-exclude id="noAutofocus">
	<a href="/lint/rules/noAutofocus">noAutofocus</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that autoFocus prop is not used on elements.
</section>
<section class="rule">
<h3 data-toc-exclude id="noBlankTarget">
	<a href="/lint/rules/noBlankTarget">noBlankTarget</a>
	<span class="recommended">recommended</span>
</h3>
Disallow <code>target=&quot;_blank&quot;</code> attribute without <code>rel=&quot;noreferrer&quot;</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noDistractingElements">
	<a href="/lint/rules/noDistractingElements">noDistractingElements</a>
	<span class="recommended">recommended</span>
</h3>
Enforces that no distracting elements are used.
</section>
<section class="rule">
<h3 data-toc-exclude id="noHeaderScope">
	<a href="/lint/rules/noHeaderScope">noHeaderScope</a>
	<span class="recommended">recommended</span>
</h3>
The scope prop should be used only on <code>&lt;th&gt;</code> elements.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNoninteractiveElementToInteractiveRole">
	<a href="/lint/rules/noNoninteractiveElementToInteractiveRole">noNoninteractiveElementToInteractiveRole</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements.
</section>
<section class="rule">
<h3 data-toc-exclude id="noPositiveTabindex">
	<a href="/lint/rules/noPositiveTabindex">noPositiveTabindex</a>
	<span class="recommended">recommended</span>
</h3>
Prevent the usage of positive integers on <code>tabIndex</code> property
</section>
<section class="rule">
<h3 data-toc-exclude id="noRedundantAlt">
	<a href="/lint/rules/noRedundantAlt">noRedundantAlt</a>
	<span class="recommended">recommended</span>
</h3>
Enforce <code>img</code> alt prop does not contain the word &quot;image&quot;, &quot;picture&quot;, or &quot;photo&quot;.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSvgWithoutTitle">
	<a href="/lint/rules/noSvgWithoutTitle">noSvgWithoutTitle</a>
	<span class="recommended">recommended</span>
</h3>
Enforces the usage of the <code>title</code> element for the <code>svg</code> element.
</section>
<section class="rule">
<h3 data-toc-exclude id="useAltText">
	<a href="/lint/rules/useAltText">useAltText</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that all elements that require alternative text have meaningful information to relay back to the end user.
</section>
<section class="rule">
<h3 data-toc-exclude id="useAnchorContent">
	<a href="/lint/rules/useAnchorContent">useAnchorContent</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that anchors have content and that the content is accessible to screen readers.
</section>
<section class="rule">
<h3 data-toc-exclude id="useAriaPropsForRole">
	<a href="/lint/rules/useAriaPropsForRole">useAriaPropsForRole</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that elements with ARIA roles must have all required ARIA attributes for that role.
</section>
<section class="rule">
<h3 data-toc-exclude id="useButtonType">
	<a href="/lint/rules/useButtonType">useButtonType</a>
	<span class="recommended">recommended</span>
</h3>
Enforces the usage of the attribute <code>type</code> for the element <code>button</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="useHeadingContent">
	<a href="/lint/rules/useHeadingContent">useHeadingContent</a>
</h3>
Enforce that heading elements (h1, h2, etc.) have content and that the content is accessible to screen readers.
Accessible means that it is not hidden using the aria-hidden prop.
</section>
<section class="rule">
<h3 data-toc-exclude id="useHtmlLang">
	<a href="/lint/rules/useHtmlLang">useHtmlLang</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that <code>html</code> element has <code>lang</code> attribute.
</section>
<section class="rule">
<h3 data-toc-exclude id="useIframeTitle">
	<a href="/lint/rules/useIframeTitle">useIframeTitle</a>
	<span class="recommended">recommended</span>
</h3>
Enforces the usage of the attribute <code>title</code> for the element <code>iframe</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useKeyWithClickEvents">
	<a href="/lint/rules/useKeyWithClickEvents">useKeyWithClickEvents</a>
	<span class="recommended">recommended</span>
</h3>
Enforce onClick is accompanied by at least one of the following: <code>onKeyUp</code>, <code>onKeyDown</code>, <code>onKeyPress</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useKeyWithMouseEvents">
	<a href="/lint/rules/useKeyWithMouseEvents">useKeyWithMouseEvents</a>
	<span class="recommended">recommended</span>
</h3>
Enforce <code>onMouseOver</code> / <code>onMouseOut</code> are accompanied by <code>onFocus</code> / <code>onBlur</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useMediaCaption">
	<a href="/lint/rules/useMediaCaption">useMediaCaption</a>
	<span class="recommended">recommended</span>
</h3>
Enforces that <code>audio</code> and <code>video</code> elements must have a <code>track</code> for captions.
</section>
<section class="rule">
<h3 data-toc-exclude id="useValidAnchor">
	<a href="/lint/rules/useValidAnchor">useValidAnchor</a>
	<span class="recommended">recommended</span>
</h3>
Enforce that all anchors are valid, and they are navigable elements.
</section>
<section class="rule">
<h3 data-toc-exclude id="useValidAriaProps">
	<a href="/lint/rules/useValidAriaProps">useValidAriaProps</a>
	<span class="recommended">recommended</span>
</h3>
Ensures that ARIA properties <code>aria-*</code> are all valid.
</section>
<section class="rule">
<h3 data-toc-exclude id="useValidLang">
	<a href="/lint/rules/useValidLang">useValidLang</a>
	<span class="recommended">recommended</span>
</h3>
Ensure that the attribute passed to the <code>lang</code> attribute is a correct ISO language and/or country.
</section>

</div>

## Complexity

Rules that focus on inspecting complex code that could be simplified.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noExtraBooleanCast">
	<a href="/lint/rules/noExtraBooleanCast">noExtraBooleanCast</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unnecessary boolean casts
</section>
<section class="rule">
<h3 data-toc-exclude id="noForEach">
	<a href="/lint/rules/noForEach">noForEach</a>
</h3>
Prefer <code>for...of</code> statement instead of <code>Array.forEach</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noMultipleSpacesInRegularExpressionLiterals">
	<a href="/lint/rules/noMultipleSpacesInRegularExpressionLiterals">noMultipleSpacesInRegularExpressionLiterals</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unclear usage of multiple space characters in regular expression literals
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessCatch">
	<a href="/lint/rules/noUselessCatch">noUselessCatch</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unnecessary <code>catch</code> clauses.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessConstructor">
	<a href="/lint/rules/noUselessConstructor">noUselessConstructor</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unnecessary constructors.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessFragments">
	<a href="/lint/rules/noUselessFragments">noUselessFragments</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unnecessary fragments
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessLabel">
	<a href="/lint/rules/noUselessLabel">noUselessLabel</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unnecessary labels.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessRename">
	<a href="/lint/rules/noUselessRename">noUselessRename</a>
	<span class="recommended">recommended</span>
</h3>
Disallow renaming import, export, and destructured assignments to the same name.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessSwitchCase">
	<a href="/lint/rules/noUselessSwitchCase">noUselessSwitchCase</a>
	<span class="recommended">recommended</span>
</h3>
Disallow useless <code>case</code> in <code>switch</code> statements.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessTypeConstraint">
	<a href="/lint/rules/noUselessTypeConstraint">noUselessTypeConstraint</a>
	<span class="recommended">recommended</span>
</h3>
Disallow using <code>any</code> or <code>unknown</code> as type constraint.
</section>
<section class="rule">
<h3 data-toc-exclude id="noWith">
	<a href="/lint/rules/noWith">noWith</a>
	<span class="recommended">recommended</span>
</h3>
Disallow <code>with</code> statements in non-strict contexts.
</section>
<section class="rule">
<h3 data-toc-exclude id="useFlatMap">
	<a href="/lint/rules/useFlatMap">useFlatMap</a>
	<span class="recommended">recommended</span>
</h3>
Promotes the use of <code>.flatMap()</code> when <code>map().flat()</code> are used together.
</section>
<section class="rule">
<h3 data-toc-exclude id="useLiteralKeys">
	<a href="/lint/rules/useLiteralKeys">useLiteralKeys</a>
	<span class="recommended">recommended</span>
</h3>
Enforce the usage of a literal access to properties over computed property access.
</section>
<section class="rule">
<h3 data-toc-exclude id="useOptionalChain">
	<a href="/lint/rules/useOptionalChain">useOptionalChain</a>
	<span class="recommended">recommended</span>
</h3>
Enforce using concise optional chain instead of chained logical expressions.
</section>
<section class="rule">
<h3 data-toc-exclude id="useSimpleNumberKeys">
	<a href="/lint/rules/useSimpleNumberKeys">useSimpleNumberKeys</a>
</h3>
Disallow number literal object member names which are not base10 or uses underscore as separator
</section>
<section class="rule">
<h3 data-toc-exclude id="useSimplifiedLogicExpression">
	<a href="/lint/rules/useSimplifiedLogicExpression">useSimplifiedLogicExpression</a>
</h3>
Discard redundant terms from logical expressions.
</section>

</div>

## Correctness

Rules that detect code that is guaranteed to be incorrect or useless.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noChildrenProp">
	<a href="/lint/rules/noChildrenProp">noChildrenProp</a>
	<span class="recommended">recommended</span>
</h3>
Prevent passing of <strong>children</strong> as props.
</section>
<section class="rule">
<h3 data-toc-exclude id="noConstAssign">
	<a href="/lint/rules/noConstAssign">noConstAssign</a>
	<span class="recommended">recommended</span>
</h3>
Prevents from having <code>const</code> variables being re-assigned.
</section>
<section class="rule">
<h3 data-toc-exclude id="noConstructorReturn">
	<a href="/lint/rules/noConstructorReturn">noConstructorReturn</a>
	<span class="recommended">recommended</span>
</h3>
Disallow returning a value from a <code>constructor</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noEmptyPattern">
	<a href="/lint/rules/noEmptyPattern">noEmptyPattern</a>
	<span class="recommended">recommended</span>
</h3>
Disallows empty destructuring patterns.
</section>
<section class="rule">
<h3 data-toc-exclude id="noGlobalObjectCalls">
	<a href="/lint/rules/noGlobalObjectCalls">noGlobalObjectCalls</a>
	<span class="recommended">recommended</span>
</h3>
Disallow calling global object properties as functions
</section>
<section class="rule">
<h3 data-toc-exclude id="noInnerDeclarations">
	<a href="/lint/rules/noInnerDeclarations">noInnerDeclarations</a>
	<span class="recommended">recommended</span>
</h3>
Disallow <code>function</code> and <code>var</code> declarations that are accessible outside their block.
</section>
<section class="rule">
<h3 data-toc-exclude id="noInvalidConstructorSuper">
	<a href="/lint/rules/noInvalidConstructorSuper">noInvalidConstructorSuper</a>
	<span class="recommended">recommended</span>
</h3>
Prevents the incorrect use of <code>super()</code> inside classes.
It also checks whether a call <code>super()</code> is missing from classes that extends other constructors.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNewSymbol">
	<a href="/lint/rules/noNewSymbol">noNewSymbol</a>
	<span class="recommended">recommended</span>
</h3>
Disallow <code>new</code> operators with the <code>Symbol</code> object.
</section>
<section class="rule">
<h3 data-toc-exclude id="noPrecisionLoss">
	<a href="/lint/rules/noPrecisionLoss">noPrecisionLoss</a>
	<span class="recommended">recommended</span>
</h3>
Disallow literal numbers that lose precision
</section>
<section class="rule">
<h3 data-toc-exclude id="noRenderReturnValue">
	<a href="/lint/rules/noRenderReturnValue">noRenderReturnValue</a>
	<span class="recommended">recommended</span>
</h3>
Prevent the usage of the return value of <code>React.render</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSetterReturn">
	<a href="/lint/rules/noSetterReturn">noSetterReturn</a>
	<span class="recommended">recommended</span>
</h3>
Disallow returning a value from a setter
</section>
<section class="rule">
<h3 data-toc-exclude id="noStringCaseMismatch">
	<a href="/lint/rules/noStringCaseMismatch">noStringCaseMismatch</a>
	<span class="recommended">recommended</span>
</h3>
Disallow comparison of expressions modifying the string case with non-compliant value.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSwitchDeclarations">
	<a href="/lint/rules/noSwitchDeclarations">noSwitchDeclarations</a>
	<span class="recommended">recommended</span>
</h3>
Disallow lexical declarations in <code>switch</code> clauses.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUndeclaredVariables">
	<a href="/lint/rules/noUndeclaredVariables">noUndeclaredVariables</a>
</h3>
Prevents the usage of variables that haven't been declared inside the document.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnnecessaryContinue">
	<a href="/lint/rules/noUnnecessaryContinue">noUnnecessaryContinue</a>
	<span class="recommended">recommended</span>
</h3>
Avoid using unnecessary <code>continue</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnreachable">
	<a href="/lint/rules/noUnreachable">noUnreachable</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unreachable code
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnreachableSuper">
	<a href="/lint/rules/noUnreachableSuper">noUnreachableSuper</a>
	<span class="recommended">recommended</span>
</h3>
Ensures the <code>super()</code> constructor is called exactly once on every code
path in a class constructor before <code>this</code> is accessed if the class has
a superclass
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnsafeFinally">
	<a href="/lint/rules/noUnsafeFinally">noUnsafeFinally</a>
	<span class="recommended">recommended</span>
</h3>
Disallow control flow statements in finally blocks.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnsafeOptionalChaining">
	<a href="/lint/rules/noUnsafeOptionalChaining">noUnsafeOptionalChaining</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of optional chaining in contexts where the undefined value is not allowed.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnusedLabels">
	<a href="/lint/rules/noUnusedLabels">noUnusedLabels</a>
	<span class="recommended">recommended</span>
</h3>
Disallow unused labels.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnusedVariables">
	<a href="/lint/rules/noUnusedVariables">noUnusedVariables</a>
</h3>
Disallow unused variables.
</section>
<section class="rule">
<h3 data-toc-exclude id="noVoidElementsWithChildren">
	<a href="/lint/rules/noVoidElementsWithChildren">noVoidElementsWithChildren</a>
	<span class="recommended">recommended</span>
</h3>
This rules prevents void elements (AKA self-closing elements) from having children.
</section>
<section class="rule">
<h3 data-toc-exclude id="noVoidTypeReturn">
	<a href="/lint/rules/noVoidTypeReturn">noVoidTypeReturn</a>
	<span class="recommended">recommended</span>
</h3>
Disallow returning a value from a function with the return type 'void'
</section>
<section class="rule">
<h3 data-toc-exclude id="useIsNan">
	<a href="/lint/rules/useIsNan">useIsNan</a>
	<span class="recommended">recommended</span>
</h3>
Require calls to <code>isNaN()</code> when checking for <code>NaN</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useValidForDirection">
	<a href="/lint/rules/useValidForDirection">useValidForDirection</a>
	<span class="recommended">recommended</span>
</h3>
Enforce &quot;for&quot; loop update clause moving the counter in the right direction.
</section>
<section class="rule">
<h3 data-toc-exclude id="useYield">
	<a href="/lint/rules/useYield">useYield</a>
	<span class="recommended">recommended</span>
</h3>
Require generator functions to contain <code>yield</code>.
</section>

</div>

## Performance

Rules catching ways your code could be written to run faster, or generally be more efficient.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noDelete">
	<a href="/lint/rules/noDelete">noDelete</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of the <code>delete</code> operator.
</section>

</div>

## Security

Rules that detect potential security flaws.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noDangerouslySetInnerHtml">
	<a href="/lint/rules/noDangerouslySetInnerHtml">noDangerouslySetInnerHtml</a>
	<span class="recommended">recommended</span>
</h3>
Prevent the usage of dangerous JSX props
</section>
<section class="rule">
<h3 data-toc-exclude id="noDangerouslySetInnerHtmlWithChildren">
	<a href="/lint/rules/noDangerouslySetInnerHtmlWithChildren">noDangerouslySetInnerHtmlWithChildren</a>
	<span class="recommended">recommended</span>
</h3>
Report when a DOM element or a component uses both <code>children</code> and <code>dangerouslySetInnerHTML</code> prop.
</section>

</div>

## Style

Rules enforcing a consistent and idiomatic way of writing your code.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noArguments">
	<a href="/lint/rules/noArguments">noArguments</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of <code>arguments</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noCommaOperator">
	<a href="/lint/rules/noCommaOperator">noCommaOperator</a>
	<span class="recommended">recommended</span>
</h3>
Disallow comma operator.
</section>
<section class="rule">
<h3 data-toc-exclude id="noImplicitBoolean">
	<a href="/lint/rules/noImplicitBoolean">noImplicitBoolean</a>
</h3>
Disallow implicit <code>true</code> values on JSX boolean attributes
</section>
<section class="rule">
<h3 data-toc-exclude id="noInferrableTypes">
	<a href="/lint/rules/noInferrableTypes">noInferrableTypes</a>
	<span class="recommended">recommended</span>
</h3>
Disallow type annotations for variables, parameters, and class properties initialized with a literal expression.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNamespace">
	<a href="/lint/rules/noNamespace">noNamespace</a>
</h3>
Disallow the use of TypeScript's <code>namespace</code>s.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNegationElse">
	<a href="/lint/rules/noNegationElse">noNegationElse</a>
</h3>
Disallow negation in the condition of an <code>if</code> statement if it has an <code>else</code> clause
</section>
<section class="rule">
<h3 data-toc-exclude id="noNonNullAssertion">
	<a href="/lint/rules/noNonNullAssertion">noNonNullAssertion</a>
	<span class="recommended">recommended</span>
</h3>
Disallow non-null assertions using the <code>!</code> postfix operator.
</section>
<section class="rule">
<h3 data-toc-exclude id="noParameterAssign">
	<a href="/lint/rules/noParameterAssign">noParameterAssign</a>
	<span class="recommended">recommended</span>
</h3>
Disallow reassigning <code>function</code> parameters.
</section>
<section class="rule">
<h3 data-toc-exclude id="noParameterProperties">
	<a href="/lint/rules/noParameterProperties">noParameterProperties</a>
</h3>
Disallow the use of parameter properties in class constructors.
</section>
<section class="rule">
<h3 data-toc-exclude id="noRestrictedGlobals">
	<a href="/lint/rules/noRestrictedGlobals">noRestrictedGlobals</a>
</h3>
This rule allows you to specify global variable names that you don’t want to use in your application.
</section>
<section class="rule">
<h3 data-toc-exclude id="noShoutyConstants">
	<a href="/lint/rules/noShoutyConstants">noShoutyConstants</a>
</h3>
Disallow the use of constants which its value is the upper-case version of its name.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnusedTemplateLiteral">
	<a href="/lint/rules/noUnusedTemplateLiteral">noUnusedTemplateLiteral</a>
	<span class="recommended">recommended</span>
</h3>
Disallow template literals if interpolation and special-character handling are not needed
</section>
<section class="rule">
<h3 data-toc-exclude id="noVar">
	<a href="/lint/rules/noVar">noVar</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of <code>var</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="useBlockStatements">
	<a href="/lint/rules/useBlockStatements">useBlockStatements</a>
</h3>
Requires following curly brace conventions.
JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity.
</section>
<section class="rule">
<h3 data-toc-exclude id="useConst">
	<a href="/lint/rules/useConst">useConst</a>
	<span class="recommended">recommended</span>
</h3>
Require <code>const</code> declarations for variables that are never reassigned after declared.
</section>
<section class="rule">
<h3 data-toc-exclude id="useDefaultParameterLast">
	<a href="/lint/rules/useDefaultParameterLast">useDefaultParameterLast</a>
	<span class="recommended">recommended</span>
</h3>
Enforce default function parameters and optional function parameters to be last.
</section>
<section class="rule">
<h3 data-toc-exclude id="useEnumInitializers">
	<a href="/lint/rules/useEnumInitializers">useEnumInitializers</a>
	<span class="recommended">recommended</span>
</h3>
Require that each enum member value be explicitly initialized.
</section>
<section class="rule">
<h3 data-toc-exclude id="useExponentiationOperator">
	<a href="/lint/rules/useExponentiationOperator">useExponentiationOperator</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of <code>Math.pow</code> in favor of the <code>**</code> operator.
</section>
<section class="rule">
<h3 data-toc-exclude id="useFragmentSyntax">
	<a href="/lint/rules/useFragmentSyntax">useFragmentSyntax</a>
</h3>
This rule enforces the use of <code>&lt;&gt;...&lt;/&gt;</code> over <code>&lt;Fragment&gt;...&lt;/Fragment&gt;</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useNumericLiterals">
	<a href="/lint/rules/useNumericLiterals">useNumericLiterals</a>
	<span class="recommended">recommended</span>
</h3>
Disallow <code>parseInt()</code> and <code>Number.parseInt()</code> in favor of binary, octal, and hexadecimal literals
</section>
<section class="rule">
<h3 data-toc-exclude id="useSelfClosingElements">
	<a href="/lint/rules/useSelfClosingElements">useSelfClosingElements</a>
	<span class="recommended">recommended</span>
</h3>
Prevent extra closing tags for components without children
</section>
<section class="rule">
<h3 data-toc-exclude id="useShorthandArrayType">
	<a href="/lint/rules/useShorthandArrayType">useShorthandArrayType</a>
</h3>
When expressing array types, this rule promotes the usage of <code>T[]</code> shorthand instead of <code>Array&lt;T&gt;</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useSingleCaseStatement">
	<a href="/lint/rules/useSingleCaseStatement">useSingleCaseStatement</a>
</h3>
Enforces switch clauses have a single statement, emits a quick fix wrapping
the statements in a block.
</section>
<section class="rule">
<h3 data-toc-exclude id="useSingleVarDeclarator">
	<a href="/lint/rules/useSingleVarDeclarator">useSingleVarDeclarator</a>
	<span class="recommended">recommended</span>
</h3>
Disallow multiple variable declarations in the same variable statement
</section>
<section class="rule">
<h3 data-toc-exclude id="useTemplate">
	<a href="/lint/rules/useTemplate">useTemplate</a>
	<span class="recommended">recommended</span>
</h3>
Template literals are preferred over string concatenation.
</section>
<section class="rule">
<h3 data-toc-exclude id="useWhile">
	<a href="/lint/rules/useWhile">useWhile</a>
	<span class="recommended">recommended</span>
</h3>
Enforce the use of <code>while</code> loops instead of <code>for</code> loops when the
initializer and update expressions are not needed
</section>

</div>

## Suspicious

Rules that detect code that is likely to be incorrect or useless.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noArrayIndexKey">
	<a href="/lint/rules/noArrayIndexKey">noArrayIndexKey</a>
	<span class="recommended">recommended</span>
</h3>
Discourage the usage of Array index in keys.
</section>
<section class="rule">
<h3 data-toc-exclude id="noAssignInExpressions">
	<a href="/lint/rules/noAssignInExpressions">noAssignInExpressions</a>
	<span class="recommended">recommended</span>
</h3>
Disallow assignments in expressions.
</section>
<section class="rule">
<h3 data-toc-exclude id="noAsyncPromiseExecutor">
	<a href="/lint/rules/noAsyncPromiseExecutor">noAsyncPromiseExecutor</a>
	<span class="recommended">recommended</span>
</h3>
Disallows using an async function as a Promise executor.
</section>
<section class="rule">
<h3 data-toc-exclude id="noCatchAssign">
	<a href="/lint/rules/noCatchAssign">noCatchAssign</a>
	<span class="recommended">recommended</span>
</h3>
Disallow reassigning exceptions in catch clauses.
</section>
<section class="rule">
<h3 data-toc-exclude id="noClassAssign">
	<a href="/lint/rules/noClassAssign">noClassAssign</a>
	<span class="recommended">recommended</span>
</h3>
Disallow reassigning class members.
</section>
<section class="rule">
<h3 data-toc-exclude id="noCommentText">
	<a href="/lint/rules/noCommentText">noCommentText</a>
	<span class="recommended">recommended</span>
</h3>
Prevent comments from being inserted as text nodes
</section>
<section class="rule">
<h3 data-toc-exclude id="noCompareNegZero">
	<a href="/lint/rules/noCompareNegZero">noCompareNegZero</a>
	<span class="recommended">recommended</span>
</h3>
Disallow comparing against <code>-0</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noConfusingLabels">
	<a href="/lint/rules/noConfusingLabels">noConfusingLabels</a>
	<span class="recommended">recommended</span>
</h3>
Disallow labeled statements that are not loops.
</section>
<section class="rule">
<h3 data-toc-exclude id="noConsoleLog">
	<a href="/lint/rules/noConsoleLog">noConsoleLog</a>
</h3>
Disallow the use of <code>console.log</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noConstEnum">
	<a href="/lint/rules/noConstEnum">noConstEnum</a>
	<span class="recommended">recommended</span>
</h3>
Disallow TypeScript <code>const enum</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noDebugger">
	<a href="/lint/rules/noDebugger">noDebugger</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the use of <code>debugger</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noDoubleEquals">
	<a href="/lint/rules/noDoubleEquals">noDoubleEquals</a>
	<span class="recommended">recommended</span>
</h3>
Require the use of <code>===</code> and <code>!==</code>
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateCase">
	<a href="/lint/rules/noDuplicateCase">noDuplicateCase</a>
	<span class="recommended">recommended</span>
</h3>
Disallow duplicate case labels.
If a switch statement has duplicate test expressions in case clauses, it is likely that a programmer copied a case clause but forgot to change the test expression.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateClassMembers">
	<a href="/lint/rules/noDuplicateClassMembers">noDuplicateClassMembers</a>
	<span class="recommended">recommended</span>
</h3>
Disallow duplicate class members.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateJsxProps">
	<a href="/lint/rules/noDuplicateJsxProps">noDuplicateJsxProps</a>
	<span class="recommended">recommended</span>
</h3>
Prevents JSX properties to be assigned multiple times.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateObjectKeys">
	<a href="/lint/rules/noDuplicateObjectKeys">noDuplicateObjectKeys</a>
	<span class="recommended">recommended</span>
</h3>
Prevents object literals having more than one property declaration for the same name.
If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored, which is likely a mistake.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateParameters">
	<a href="/lint/rules/noDuplicateParameters">noDuplicateParameters</a>
	<span class="recommended">recommended</span>
</h3>
Disallow duplicate function parameter name.
</section>
<section class="rule">
<h3 data-toc-exclude id="noEmptyInterface">
	<a href="/lint/rules/noEmptyInterface">noEmptyInterface</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the declaration of empty interfaces.
</section>
<section class="rule">
<h3 data-toc-exclude id="noExplicitAny">
	<a href="/lint/rules/noExplicitAny">noExplicitAny</a>
	<span class="recommended">recommended</span>
</h3>
Disallow the <code>any</code> type usage.
</section>
<section class="rule">
<h3 data-toc-exclude id="noExtraNonNullAssertion">
	<a href="/lint/rules/noExtraNonNullAssertion">noExtraNonNullAssertion</a>
	<span class="recommended">recommended</span>
</h3>
Prevents the wrong usage of the non-null assertion operator (<code>!</code>) in TypeScript files.
</section>
<section class="rule">
<h3 data-toc-exclude id="noFunctionAssign">
	<a href="/lint/rules/noFunctionAssign">noFunctionAssign</a>
	<span class="recommended">recommended</span>
</h3>
Disallow reassigning function declarations.
</section>
<section class="rule">
<h3 data-toc-exclude id="noImportAssign">
	<a href="/lint/rules/noImportAssign">noImportAssign</a>
	<span class="recommended">recommended</span>
</h3>
Disallow assigning to imported bindings
</section>
<section class="rule">
<h3 data-toc-exclude id="noLabelVar">
	<a href="/lint/rules/noLabelVar">noLabelVar</a>
	<span class="recommended">recommended</span>
</h3>
Disallow labels that share a name with a variable
</section>
<section class="rule">
<h3 data-toc-exclude id="noPrototypeBuiltins">
	<a href="/lint/rules/noPrototypeBuiltins">noPrototypeBuiltins</a>
	<span class="recommended">recommended</span>
</h3>
Disallow direct use of <code>Object.prototype</code> builtins.
</section>
<section class="rule">
<h3 data-toc-exclude id="noRedeclare">
	<a href="/lint/rules/noRedeclare">noRedeclare</a>
	<span class="recommended">recommended</span>
</h3>
Disallow variable, function, class, and type redeclarations in the same scope.
</section>
<section class="rule">
<h3 data-toc-exclude id="noRedundantUseStrict">
	<a href="/lint/rules/noRedundantUseStrict">noRedundantUseStrict</a>
	<span class="recommended">recommended</span>
</h3>
Prevents from having redundant <code>&quot;use strict&quot;</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSelfCompare">
	<a href="/lint/rules/noSelfCompare">noSelfCompare</a>
	<span class="recommended">recommended</span>
</h3>
Disallow comparisons where both sides are exactly the same.
</section>
<section class="rule">
<h3 data-toc-exclude id="noShadowRestrictedNames">
	<a href="/lint/rules/noShadowRestrictedNames">noShadowRestrictedNames</a>
	<span class="recommended">recommended</span>
</h3>
Disallow identifiers from shadowing restricted names.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSparseArray">
	<a href="/lint/rules/noSparseArray">noSparseArray</a>
	<span class="recommended">recommended</span>
</h3>
Disallow sparse arrays
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnsafeNegation">
	<a href="/lint/rules/noUnsafeNegation">noUnsafeNegation</a>
	<span class="recommended">recommended</span>
</h3>
Disallow using unsafe negation.
</section>
<section class="rule">
<h3 data-toc-exclude id="useDefaultSwitchClauseLast">
	<a href="/lint/rules/useDefaultSwitchClauseLast">useDefaultSwitchClauseLast</a>
	<span class="recommended">recommended</span>
</h3>
Enforce default clauses in switch statements to be last
</section>
<section class="rule">
<h3 data-toc-exclude id="useNamespaceKeyword">
	<a href="/lint/rules/useNamespaceKeyword">useNamespaceKeyword</a>
	<span class="recommended">recommended</span>
</h3>
Require using the <code>namespace</code> keyword over the <code>module</code> keyword to declare TypeScript namespaces.
</section>
<section class="rule">
<h3 data-toc-exclude id="useValidTypeof">
	<a href="/lint/rules/useValidTypeof">useValidTypeof</a>
	<span class="recommended">recommended</span>
</h3>
This rule verifies the result of <code>typeof $expr</code> unary expressions is being
compared to valid values, either string literals containing valid type
names or other <code>typeof</code> expressions
</section>

</div>

## Nursery

New rules that are still under development.

Nursery rules require explicit opt-in via configuration on stable versions because they may still have bugs or performance problems.
They are enabled by default on nightly builds, but as they are unstable their diagnostic severity may be set to either error or
warning, depending on whether we intend for the rule to be recommended or not when it eventually gets stabilized.
Nursery rules get promoted to other groups once they become stable or may be removed.

Rules that belong to this group <strong>are not subject to semantic version</strong>.
<div class="category-rules">
<section class="rule">
<h3 data-toc-exclude id="noAccumulatingSpread">
	<a href="/lint/rules/noAccumulatingSpread">noAccumulatingSpread</a>
</h3>
Disallow the use of spread (<code>...</code>) syntax on accumulators.
</section>
<section class="rule">
<h3 data-toc-exclude id="noAriaUnsupportedElements">
	<a href="/lint/rules/noAriaUnsupportedElements">noAriaUnsupportedElements</a>
</h3>
Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
</section>
<section class="rule">
<h3 data-toc-exclude id="noBannedTypes">
	<a href="/lint/rules/noBannedTypes">noBannedTypes</a>
</h3>
Disallow primitive type aliases and misleading types.
</section>
<section class="rule">
<h3 data-toc-exclude id="noConfusingArrow">
	<a href="/lint/rules/noConfusingArrow">noConfusingArrow</a>
</h3>
Disallow arrow functions where they could be confused with comparisons.
</section>
<section class="rule">
<h3 data-toc-exclude id="noConstantCondition">
	<a href="/lint/rules/noConstantCondition">noConstantCondition</a>
</h3>
Disallow constant expressions in conditions
</section>
<section class="rule">
<h3 data-toc-exclude id="noControlCharactersInRegex">
	<a href="/lint/rules/noControlCharactersInRegex">noControlCharactersInRegex</a>
</h3>
Prevents from having control characters and some escape sequences that match control characters in regular expressions.
</section>
<section class="rule">
<h3 data-toc-exclude id="noDuplicateJsonKeys">
	<a href="/lint/rules/noDuplicateJsonKeys">noDuplicateJsonKeys</a>
</h3>
Disallow two keys with the same name inside a JSON object.
</section>
<section class="rule">
<h3 data-toc-exclude id="noExcessiveComplexity">
	<a href="/lint/rules/noExcessiveComplexity">noExcessiveComplexity</a>
</h3>
Disallow functions that exceed a given complexity score.
</section>
<section class="rule">
<h3 data-toc-exclude id="noFallthroughSwitchClause">
	<a href="/lint/rules/noFallthroughSwitchClause">noFallthroughSwitchClause</a>
</h3>
Disallow fallthrough of <code>switch</code> clauses.
</section>
<section class="rule">
<h3 data-toc-exclude id="noGlobalIsFinite">
	<a href="/lint/rules/noGlobalIsFinite">noGlobalIsFinite</a>
</h3>
Use <code>Number.isFinite</code> instead of global <code>isFinite</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noGlobalIsNan">
	<a href="/lint/rules/noGlobalIsNan">noGlobalIsNan</a>
</h3>
Use <code>Number.isNaN</code> instead of global <code>isNaN</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNoninteractiveTabindex">
	<a href="/lint/rules/noNoninteractiveTabindex">noNoninteractiveTabindex</a>
</h3>
Enforce that <code>tabIndex</code> is not assigned to non-interactive HTML elements.
</section>
<section class="rule">
<h3 data-toc-exclude id="noNonoctalDecimalEscape">
	<a href="/lint/rules/noNonoctalDecimalEscape">noNonoctalDecimalEscape</a>
</h3>
Disallow <code>\8</code> and <code>\9</code> escape sequences in string literals.
</section>
<section class="rule">
<h3 data-toc-exclude id="noRedundantRoles">
	<a href="/lint/rules/noRedundantRoles">noRedundantRoles</a>
</h3>
Enforce explicit <code>role</code> property is not the same as implicit/default role property on an element.
</section>
<section class="rule">
<h3 data-toc-exclude id="noSelfAssign">
	<a href="/lint/rules/noSelfAssign">noSelfAssign</a>
</h3>
Disallow assignments where both sides are exactly the same.
</section>
<section class="rule">
<h3 data-toc-exclude id="noStaticOnlyClass">
	<a href="/lint/rules/noStaticOnlyClass">noStaticOnlyClass</a>
</h3>
This rule reports when a class has no non-static members, such as for a class used exclusively as a static namespace.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUnsafeDeclarationMerging">
	<a href="/lint/rules/noUnsafeDeclarationMerging">noUnsafeDeclarationMerging</a>
</h3>
Disallow unsafe declaration merging between interfaces and classes.
</section>
<section class="rule">
<h3 data-toc-exclude id="noUselessEmptyExport">
	<a href="/lint/rules/noUselessEmptyExport">noUselessEmptyExport</a>
</h3>
Disallow empty exports that don't change anything in a module file.
</section>
<section class="rule">
<h3 data-toc-exclude id="noVoid">
	<a href="/lint/rules/noVoid">noVoid</a>
</h3>
Disallow the use of <code>void</code> operators, which is not a familiar operator.
</section>
<section class="rule">
<h3 data-toc-exclude id="useAriaPropTypes">
	<a href="/lint/rules/useAriaPropTypes">useAriaPropTypes</a>
</h3>
Enforce that ARIA state and property values are valid.
</section>
<section class="rule">
<h3 data-toc-exclude id="useArrowFunction">
	<a href="/lint/rules/useArrowFunction">useArrowFunction</a>
</h3>
Use arrow functions over function expressions.
</section>
<section class="rule">
<h3 data-toc-exclude id="useExhaustiveDependencies">
	<a href="/lint/rules/useExhaustiveDependencies">useExhaustiveDependencies</a>
</h3>
Enforce all dependencies are correctly specified.
</section>
<section class="rule">
<h3 data-toc-exclude id="useGroupedTypeImport">
	<a href="/lint/rules/useGroupedTypeImport">useGroupedTypeImport</a>
</h3>
Enforce the use of <code>import type</code> when an <code>import</code> only has specifiers with <code>type</code> qualifier.
</section>
<section class="rule">
<h3 data-toc-exclude id="useHookAtTopLevel">
	<a href="/lint/rules/useHookAtTopLevel">useHookAtTopLevel</a>
</h3>
Enforce that all React hooks are being called from the Top Level
component functions.
</section>
<section class="rule">
<h3 data-toc-exclude id="useImportRestrictions">
	<a href="/lint/rules/useImportRestrictions">useImportRestrictions</a>
</h3>
Disallows package private imports.
</section>
<section class="rule">
<h3 data-toc-exclude id="useIsArray">
	<a href="/lint/rules/useIsArray">useIsArray</a>
</h3>
Use <code>Array.isArray()</code> instead of <code>instanceof Array</code>.
</section>
<section class="rule">
<h3 data-toc-exclude id="useLiteralEnumMembers">
	<a href="/lint/rules/useLiteralEnumMembers">useLiteralEnumMembers</a>
</h3>
Require all enum members to be literal values.
</section>
<section class="rule">
<h3 data-toc-exclude id="useNamingConvention">
	<a href="/lint/rules/useNamingConvention">useNamingConvention</a>
</h3>
Enforce naming conventions for everything across a codebase.
</section>

</div>
